import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export const constantRouterMap = [
    { path: '/', redirect: '/home', },
		{ path: '/home', meta: { name: '装修页面' }, component: () => import('../views/home/index.vue') },
    { path: '/design', meta: { name: '装修页' }, component: () => import('../views/design/index.vue') },
    { path: '/diy_template_market', meta: { name: '装修页-Diy模板市场' }, component: () => import('../views/design/diy_template_market.vue') },
    { path: '/diy_template_manage', meta: { name: '装修页-Diy模板管理' }, component: () => import('../views/design/diy_template_manage.vue') },
		{ path: '/advertising', meta: { name: '弹窗广告' }, component: () => import('../views/advertising/advertising.vue') },
		{ path: '/full_screen', meta: { name: '全屏广告' }, component: () => import('../views/full-screen/full_screen.vue') },
    { path: '/first_banner', meta: { name: '首屏广告' }, component: () => import('../views/first-banner/index.vue') },
		{ path: '/bottom_navigation', meta: { name: '底部导航' }, component: () => import('../views/bottom-navigation/bottom_navigation.vue')},
    { path: '/bottom_navigation_list', meta: { name: '底部导航' }, component: () => import('../views/bottom-navigation/bottom_navigation_list.vue')},
		{ path: '/top_navigation', meta: { name: '顶部菜单' }, component: () => import('../views/top-navigation/top_navigation.vue')},
    { path: '/top_navigation_list', meta: { name: '顶部菜单' }, component: () => import('../views/top-navigation/top_navigation_list.vue')},
		{ path: '/store_home', meta: { name: '门店装修页面' }, component: () => import('../views/home/store_index.vue') },
		{ path: '/store_design', meta: { name: '装修页面' }, component: () => import('../views/design/store_index.vue') },
		{ path: '/store_bottom_navigation', meta: { name: '底部导航' }, component: () => import('../views/bottom-navigation/store_bottom_navigation.vue')},
		{ path: '/picture_design_scene', meta: { name: '图片智能设计场景' }, component: () => import('../views/picture-design/design_scene.vue')},
		{ path: '/picture_design_template', meta: { name: '图片智能设计模板' }, component: () => import('../views/picture-design/design_template.vue')},
    { path: '*', redirect: '/404', hidden: true }
];

// 路由实例
const router = new Router({
    routes: constantRouterMap,
});

// 路由守卫
router.beforeEach((to, from, next) => {
    next();
});

export default router;

